// example index
import * as modules from '@/index';
// style
import './index.scss';
const example = () => {
    // console.log("modules=>", modules, typeof modules)
    const root: HTMLElement | null = document.getElementById('root');
    if(root){
        const h1 = document.createElement('h1');
        h1.innerText = `vue-qiankun-helper`;
        root.appendChild(h1);
        // table
        if(Object.keys(modules).length > 0) {
            const table = document.createElement('table');
            table.border = '1px';
            const thead = document.createElement('thead');
            const tbody = document.createElement('tbody');
            for(let key of Object.keys(modules)) {
                // @ts-ignore
                let module: any = modules[key]
                if(typeof module === 'object'){
                    let tr = document.createElement('tr');
                    let td = document.createElement('td');
                    td.className = 'column-1';
                    td.innerText = key;
                    let td2 = document.createElement('td');
                    td2.className = 'column-2';
                    for(let key2 of Object.keys(module)){
                        let p = document.createElement('p');
                        p.innerText = `${key2} : ${typeof module[key2]}`;
                        td2.appendChild(p);
                    }
                    tr.appendChild(td);
                    tr.appendChild(td2);
                    tbody.appendChild(tr);
                }
            }
            table.appendChild(thead);
            table.appendChild(tbody);
            root.appendChild(table);
        }
    }
}
example();
